// Copyright 2019 chunbao Author. All Rights Reserved.
//
//免费使用，出现任何问题均与本人无关
//

package db

import "github.com/astaxie/beego/orm"

type GetBuilder interface {
	Name(table string) GetBuilder
	Where(str string) GetBuilder
	WhereOr(cond string) GetBuilder
	WhereIn(vars ...interface{}) GetBuilder
	WhereNotIn(vars ...interface{}) GetBuilder
	Field(fields ...string) GetBuilder
	Order(field string, by string) GetBuilder
	Join(table string, on string, cond string) GetBuilder
	Page(page int64, limit int64) string
	Insert(maps map[string]interface{}) string
	Update(maps map[string]interface{}) string
	Delete() string
	Count() string
	Select() string
	Find() string
	Param(args ...interface{}) GetBuilder
	QueryMaps() ([]orm.Params, error)
	QueryMap() (orm.Params, error)
}

// 初始化构建器
func GetBuilderMysql() (out GetBuilder) {
	out = new(SqlMysqlBuilder)
	return
}
